<?php
/**
 * Created by PhpStorm.
 * User: cxj
 * Date: 16/12/27
 * Time: 下午1:41
 */
namespace app\models;

use yii\db\ActiveRecord;

class Poster extends ActiveRecord{

    public function getAllPoster(){
        $posters=Poster::find()->where(['del_flag'=>1])->select(['poster_img'])->asArray()->all();
        return $posters;
    }


    public function getPosterByPageNum($posterArr,$pageNum){
          //var_dump($posterArr);
          return array_slice($posterArr,2*($pageNum-1),2);
    }
}